<?php
/**
 * 奖品日志表
 * User: wangyongqiang
 * Date: 2017/6/29 17:47
 */
namespace App\Http\Models;
use Illuminate\Database\Eloquent\Model;

class LotteryPrizeLogModel extends Model{
    protected $table = 'wp_sdk_lottery_prize_log';
    public $timestamps = false;

    /**
     * 写奖品修改日志
     */
    public static function writePrizeLog($appid, $lot_id, $lot_type, $key, $value) {
        try{
            return self::create([
                'appid'         => $appid,
                'lot_id'        => $lot_id,
                'lot_type'      => $lot_type,
                'item_key'      => $key,
                'item_value'    => $value,
                'create_time'   => time(),
                'status'        => LotteryPrizeModel::STATUS_ACTIVE,
            ]);
        }catch (\Exception $e){
            return false;
        }
    }

    public static function delLotteryLog(){}
}